<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>添加个人通讯录</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  <s:head/>
  <body>
    <div>
    	<div>
    	<s:form>
    		<table>
    			<tr>
    				<td> <s:hidden name="pc.Id" value="%{pc.Id}"></s:hidden> </td>
    				<td><s:textfield name="pc.communicationName" value="%{pc.communicationName}" label="姓名"></s:textfield> </td>
    				<td></td>
    				<td>
    				<s:set name="Sex" value="%{pc.sex}"></s:set>
    				<s:if test="#Sex!=null">
    				<s:radio list="#{'true':'男','false':'女'}" listKey="key" listValue="value" name="pc.sex" value="%{pc.sex}" label="性别" ></s:radio> 
    				</s:if>
    				<s:else>
    					<s:radio list="#{'true':'男','false':'女'}" listKey="key" listValue="value" name="pc.sex" value="true" label="性别" ></s:radio>
    				</s:else>
    				<td></td>
    				<td>
    				<s:select list="ctList" listKey="Id" listValue="type" headerKey="0" headerValue="请选择" name="ct.Id" value="%{pc.connectionType.Id}" label="关系" >
    				</s:select>
    				</td>
    			</tr>
    			<tr>
    				<td></td>
    				<td>
    				<s:textfield name="pc.birthday" label="生日" value="%{pc.birthday}" ></s:textfield>
    				 </td>
    				<td></td>
    				<td><s:textfield name="pc.nickname" value="%{pc.nickname}" label="呢称"></s:textfield></td>
    				<td></td>
    				<td></td>
    			</tr>
    			<tr>
    				<td></td>
    				<td><s:textfield name="pc.mate" value="%{pc.mate}" label="配偶" ></s:textfield></td>
    				<td></td>
    				<td><s:textfield name="pc.child" value="%{pc.child}" label="子女" ></s:textfield></td>
    				<td></td>
    				<td><s:textfield name="pc.familyPostman" value="%{pc.familyPostman}" label="家庭邮编" ></s:textfield></td>
    			</tr>
    			<tr>
    				<td></td>
    				<td><s:textfield name="pc.familyPhone" value="%{pc.familyPhone}" label="家庭电话" ></s:textfield></td>
    				<td></td>
    				<td><s:textfield name="pc.mobileNumber" value="%{pc.mobileNumber}" label="手机" ></s:textfield></td>
    				<td></td>
    				<td><s:textfield name="pc.emailt" value="%{pc.emailt}" label="电子邮件" ></s:textfield></td>
    			</tr>
    			<tr>
    				<td></td>
    				<td><s:textfield name="pc.qq" value="%{pc.qq}" label="qq号码" ></s:textfield></td>
    				<td></td>
    				<td><s:textfield name="pc.msn" value="%{pc.msn}" label="MSN" ></s:textfield></td>
    				<td></td>
    				<td></td>
    			</tr>
    			<tr>
    				<td colspan="4"><s:textarea name="pc.familyAddress" value="%{pc.familyAddress}" label="家庭住址" rows="10" cols="40" ></s:textarea> </td>
    				<td></td>
    				<td></td>
    				<td></td>
    			</tr>
    			<tr>
    				<td colspan="4">单位信息</td>
    			</tr>
    			<tr>
    				<td><s:textfield name="pc.unitName" value="%{pc.unitName}" label="单位名称"></s:textfield> </td>
    				<td></td>
    				<td></td>
    				<td></td>
    			</tr>
    			<tr>
    				<td><s:textfield name="pc.unitAddress" value="%{pc.unitAddress}" label="单位地址"></s:textfield> </td>
    				<td></td>
    				<td></td>
    				<td></td>
    			</tr>
    			<tr>
    				<td><s:textfield name="pc.unitStamp" value="%{pc.unitStamp}" label="邮编"></s:textfield> </td>
    				<td></td>
    				<td></td>
    				<td></td>
    			</tr>
    			<tr>
    				<td><s:textfield name="pc.workPhone" value="%{pc.workPhone}" label="工作电话"></s:textfield> </td>
    				<td></td>
    				<td></td>
    				<td></td>
    			</tr>
    			<tr>
    				<td><s:textfield name="pc.workFax" value="%{pc.workFax}" label="工作传真"></s:textfield> </td>
    				<td></td>
    				<td></td>
    				<td></td>
    			</tr>
    			<tr>
    				<td><s:textarea name="pc.remark" value="%{pc.remark}" rows="10" cols="15" label="备注"></s:textarea> </td>
    				<td></td>
    				<td></td>
    				<td></td>
    			</tr>
    			<tr>
    			<td colspan="3" align="right">
    			 <s:set name="Id" value="%{pc.Id}"></s:set>
    			 <s:if test="#Id!=null">
    			 	<s:submit action="pc_update" value="保存"></s:submit>
    			 </s:if>
    			 <s:else>
    			 	<s:submit action="pc_add" value="添加"></s:submit>
    			 </s:else>	
    			</td>
    			<td colspan="3"><s:reset value="取消" ></s:reset> </td>
    			</tr>
    		</table>
    		</s:form>
    	</div>
    	<input name="close" type="button" value=" 返回 "
								onClick="javascript:history.go(-1);"/>
    </div>
  </body>
</html>
